package com.xoa.service.equipment;

import com.xoa.model.equipment.EquipType;
import com.xoa.util.LimsJson;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

public interface EquipTypeService {

    public LimsJson<EquipType> changeEquipmentType(Integer id, Integer pid, Integer sort, Integer mid);
    public LimsJson<EquipType> showAllEquipmentType(HttpServletRequest request, Integer page, Integer pageSize, Boolean userFlag);

    public LimsJson<EquipType> showParentEquipmentType(HttpServletRequest request, String result);

    public LimsJson<EquipType> showChildEquipmentType(HttpServletRequest request, Integer equipTypeId, String result);

    public LimsJson<EquipType> showEquipmentTypeById(HttpServletRequest request, Integer equipTypeId, String typeCode);

    public LimsJson<EquipType> addParentEquipmentType(HttpServletRequest request, EquipType equipType);

    public LimsJson<EquipType> addChildEquipmentType(HttpServletRequest request, Integer equipTypeId, EquipType equipType);

    public LimsJson<EquipType> editEquipmentType(HttpServletRequest request, String equipType);

    public LimsJson<EquipType> deleteEquipmentTypeById(HttpServletRequest request, Integer equipTypeId);

    public LimsJson<EquipType> deleteArrayEquipmentTypeById(HttpServletRequest request, String equipTypeIds);

    public LimsJson<Object> togetherCapy(HttpServletRequest request, Integer equipTypeId, String equipCapyIds);

    public List<Map<Object,Object>>selectNameAndId(HttpServletRequest request);

    public LimsJson<Object> changeSort(Integer start, Integer end);

    public LimsJson<Object> addEquipType(HttpServletRequest request, Integer pId, Integer id, String label, int type, Integer sort);

    public Map<String,Object> addEquipTypeCapyByTypeId(String equuipTypeCapyIds, Integer equipTypeId);

    List selectTree();

    /**添加/编辑 编码**/
    LimsJson updateCode(HttpServletRequest request, Integer equipTypeId, String code, Integer pId);

    public LimsJson<EquipType> showEquipType(HttpServletRequest request, Integer equipTypeId, String typeCode);

    LimsJson saveEquipType(String json, Integer pid);

}
